using MicroMsg.UI.UserContrl;
using System;
using System.Data.Linq;
using System.Data.Linq.Mapping;
namespace MicroMsg.Storage
{
	[Table]
	public class News : StorageItem, IListDataItem
	{
		private const uint Field_nMsgLocalID = 1u;
		private const uint Field_strDescipt = 2u;
		private const uint Field_nPubTime = 4u;
		private const uint Field_strUrl = 8u;
		private const uint Field_strShorturl = 16u;
		private const uint Field_strLongurl = 32u;
		private const uint Field_strCoverFile = 64u;
		private const uint Field_strCoverUrl = 128u;
		private const uint Field_strTitle = 256u;
		private const uint Field_bytesXmlData = 512u;
		private int _nMsgLocalID;
		private string _strDescipt;
		private long _nPubTime;
		private string _strUrl;
		private string _strShorturl;
		private string _strLongurl;
		private string _strCoverFile;
		private string _strCoverUrl;
		private string _strTitle;
		private byte[] _bytesXmlData;
		[Column(IsVersion = true)]
		private Binary _version;
		[Column(IsPrimaryKey = true)]
		public int nMsgLocalID
		{
			get
			{
				return this._nMsgLocalID;
			}
			set
			{
				this._nMsgLocalID = value;
				this.modify |= 1L;
			}
		}
		[Column]
		public string strDescipt
		{
			get
			{
				return this._strDescipt;
			}
			set
			{
				this._strDescipt = value;
				this.modify |= 2L;
			}
		}
		[Column]
		public long nPubTime
		{
			get
			{
				return this._nPubTime;
			}
			set
			{
				this._nPubTime = value;
				this.modify |= 4L;
			}
		}
		[Column]
		public string strUrl
		{
			get
			{
				return this._strUrl;
			}
			set
			{
				this._strUrl = value;
				this.modify |= 8L;
			}
		}
		[Column]
		public string strShorturl
		{
			get
			{
				return this._strShorturl;
			}
			set
			{
				this._strShorturl = value;
				this.modify |= 16L;
			}
		}
		[Column]
		public string strLongurl
		{
			get
			{
				return this._strLongurl;
			}
			set
			{
				this._strLongurl = value;
				this.modify |= 32L;
			}
		}
		[Column]
		public string strCoverFile
		{
			get
			{
				return this._strCoverFile;
			}
			set
			{
				this._strCoverFile = value;
				this.modify |= 64L;
			}
		}
		[Column]
		public string strCoverUrl
		{
			get
			{
				return this._strCoverUrl;
			}
			set
			{
				this._strCoverUrl = value;
				this.modify |= 128L;
			}
		}
		[Column]
		public string strTitle
		{
			get
			{
				return this._strTitle;
			}
			set
			{
				this._strTitle = value;
				this.modify |= 256L;
			}
		}
		[Column]
		public byte[] bytesXmlData
		{
			get
			{
				return this._bytesXmlData;
			}
			set
			{
				this._bytesXmlData = value;
				this.modify |= 512L;
			}
		}
		public override void merge(object object_0)
		{
			News news = object_0 as News;
			if (0L != (news.modify & 1L))
			{
				this._nMsgLocalID = news.nMsgLocalID;
			}
			if (0L != (news.modify & 2L))
			{
				this._strDescipt = news.strDescipt;
			}
			if (0L != (news.modify & 4L))
			{
				this._nPubTime = news.nPubTime;
			}
			if (0L != (news.modify & 8L))
			{
				this._strUrl = news.strUrl;
			}
			if (0L != (news.modify & 16L))
			{
				this._strShorturl = news.strShorturl;
			}
			if (0L != (news.modify & 32L))
			{
				this._strLongurl = news.strLongurl;
			}
			if (0L != (news.modify & 64L))
			{
				this._strCoverFile = news.strCoverFile;
			}
			if (0L != (news.modify & 128L))
			{
				this._strCoverUrl = news.strCoverUrl;
			}
			if (0L != (news.modify & 256L))
			{
				this._strTitle = news.strTitle;
			}
			if (0L != (news.modify & 512L))
			{
				this._bytesXmlData = news.bytesXmlData;
			}
		}
		public void FillData(object item)
		{
			News news = item as News;
			if (news == null)
			{
				return;
			}
			news.nMsgLocalID = this.nMsgLocalID;
			news.strDescipt = this.strDescipt;
			news.nPubTime = this.nPubTime;
			news.strUrl = this.strUrl;
			news.strShorturl = this.strShorturl;
			news.strLongurl = this.strLongurl;
			news.strCoverFile = this.strCoverFile;
			news.strCoverUrl = this.strCoverUrl;
			news.strTitle = this.strTitle;
		}
	}
}
